﻿@*@model IEnumerable<BanDTBLL.san_pham>*@
@model PagedList.IPagedList<BanDTBLL.san_pham>
@{
    ViewBag.Title = "TimKiemCoBan";
}
  <div class="load_san_pham">
    <h2 class="tieude">Kết Quả</h2>
    @foreach (var item in Model)
    {
    
        <div class="san_pham">
            <img src="@Url.Content("~/Content/Images/sanpham/" + item.hinh)" alt="hinh" /><br />
            <label>Tên :</label> <span>@item.ten</span> <br />
             <label>Giá</label><span>@item.donGia</span> VNĐ <br />
             <p style="text-align:center">
                <input type="submit" value="Mua hàng" class="button" /> <input type="button" value="Chi tiết" class="button" />
             </p>
        </div>
    }
</div>
<div>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "Index", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink("< Prev", "Index", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink("Next >", "Index", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "Index", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
</div>
